{include file="inc/header.html"} 
<?php
$this->_var['storejs'][] = $this->_var['TMPL_REAL']."/js/store.js";
$this->_var['cpstorejs'][] = $this->_var['TMPL_REAL']."/js/store.js";
$this->_var['storecss'][] = $this->_var['TMPL_REAL']."/css/store.css";
?>
<script type="text/javascript">
	var is_order_show = false;
</script>
<script type="text/javascript" src="{function name="parse_script" v="$storejs" c="$cpstorejs"}"></script>
<link rel="stylesheet" type="text/css" href="{function name="parse_css" v="$storecss"}" />
<div class="blank"></div>
<div class="store-wrap clearfix wb">
	<div class="short_top">
		<div class="s_top_l f_l">请设置筛选条件</div>
		<div class="s_top_r f_l">全部餐厅：</div>
		<div style="clear:both"></div>
	</div>
	<div class="short f_l">
		{if count($purpose_list) gt 0}
			<div class="inc">
				<div class="inc_top inc_top_st">{$LANG.PURPOSE}</div>
				<div class="inc_main cf">
					<div class="filter_content">
						<ul>
							<?php $idx = 1; ?>
							{if $url_param['pid']>0}
							<li class="all"><a href="{$purpose_all.url}">«{$purpose_all.name}{$LANG.PURPOSE}</a></li>
							{/if}
							{foreach from=$purpose_list item=pur}
							{if $pur.act eq 1 || $url_param['pid'] <=0}
							<li <?php if($idx >6){ echo 'class="hide"';} ?>><a href="{$pur.url}" title="{$pur.name}" {if $pur.act eq 1 && $url_param['sid']<=0}class="act"{/if}>{$pur.name}&nbsp;&nbsp;&nbsp;&nbsp;<span>{$pur.count}</span></a></li>
							{if $spurpose_list && $pur.act eq 1}
							{foreach from=$spurpose_list item=spur}
							<li class="sub nobg <?php if($idx >6){ echo 'hide';} ?>"><a href="{$spur.url}" title="{$spur.name}" {if $spur.act eq 1}class="act"{/if}>{$spur.name}&nbsp;&nbsp;&nbsp;&nbsp;<span>{$spur.count}</span></a></li>
							<?php ++$idx; ?>
							{/foreach}
							{/if}
							<?php ++$idx; ?>
							{/if}
							{/foreach}
							{if ($url_param['pid']>0 && count($spurpose_list) > 6) || ($url_param['pid']==0 && count($purpose_list) > 6)}
							<li class="last">
								<p class="res_sch_link_more res_more_cor">
			                            <a class="g9 tdl z schAllArea" href="javascript:" rel="schAreaMore">展开全部</a>
			                    </p>
							</li>
							{/if}
						</ul>
					</div>
				</div>
			</div>
		{/if}
		{if count($cate_list) gt 0}
		<div class="inc">
			<div class="inc_top inc_top_st">{$LANG.CATE_DEAL}</div>
			<div class="inc_main cf">
				<div class="filter_content">
					<ul>
						<?php $idx = 1; ?>
						{if $url_param['cid']>0}
						<li class="all"><a href="{$cate_all.url}">«{$cate_all.name}{$LANG.CATE_DEAL}</a></li>
						{/if}
						{foreach from=$cate_list item=cate}
						{if $cate.act eq 1 || $url_param['cid'] <=0}
						<li <?php if($idx >6){ echo 'class="hide"';} ?>><a href="{$cate.url}" title="{$cate.name}" {if $cate.act eq 1 && $url_param['tid']<=0}class="act"{/if}>{$cate.name}&nbsp;&nbsp;&nbsp;&nbsp;<span>{$cate.count}</span></a></li>
						{if $scate_list && $cate.act eq 1}
						{foreach from=$scate_list item=scate}
						<li class="sub <?php if($idx >6){ echo 'hide';} ?>"><a href="{$scate.url}" title="{$scate.name}" {if $scate.act eq 1}class="act"{/if}>{$scate.name}&nbsp;&nbsp;&nbsp;&nbsp;<span>{$scate.count}</span></a></li>
						<?php ++$idx; ?>
						{/foreach}
						{/if}
						<?php ++$idx; ?>
						{/if}
						{/foreach}
						{if ($url_param['cid'] ==0 && count($cate_list)>6) || ($url_param['cid'] >0 && count($scate_list) > 6 )}
						<li class="last">
							<p class="res_sch_link_more res_more_cor">
		                            <a class="g9 tdl z schAllArea" href="javascript:" rel="schAreaMore">展开全部</a>
		                    </p>
						</li>
						{/if}
					</ul>
				</div>
			</div>
		</div>
		{/if}
					
		{if count($area_list) gt 0}
		<div class="inc">
			<div class="inc_top inc_top_st">{$LANG.AREA_LIST}</div>
			<div class="inc_main cf">
				<div class="filter_content">
					<ul>
						<?php $idx = 1; ?>
						{if $url_param['aid']>0}
						<li class="all"><a href="{$area_all.url}">«{$area_all.name}{$LANG.AREA_LIST}</a></li>
						{/if}
						{foreach from=$area_list item=area}
						{if $area.act eq 1 || $url_param['aid'] <=0}
						<li <?php if($idx >6){ echo 'class="hide"';} ?>><a href="{$area.url}" title="{$area.name}" {if $area.act eq 1 && $url_param['qid']<=0}class="act"{/if}>{$area.name}&nbsp;&nbsp;&nbsp;&nbsp;<span>{$area.count}</span></a></li>
						{if count($quan_list) gt 1 && $area.act eq 1}
							{foreach from=$quan_list item=area}
								<li class="sub <?php if($idx >6){ echo 'hide';} ?>"><a href="{$area.url}" title="{$area.name}" {if $area.act eq 1}class="act"{/if}>{$area.name}&nbsp;&nbsp;&nbsp;&nbsp;<span>{$area.count}</span></a></li>
							<?php ++$idx; ?>
							{/foreach}
						{/if}
						<?php ++$idx; ?>
						{/if}
						{/foreach}
						{if ($url_param['aid']==0 && count($area_list) > 6)||($url_param['aid']>0 && count($quan_list) > 6) }
						<li class="last">
							<p class="res_sch_link_more res_more_cor">
		                            <a class="g9 tdl z schAllArea" href="javascript:" rel="schAreaMore">展开全部</a>
		                    </p>
						</li>
						{/if}
					</ul>	
				</div>
			</div>
		</div>
		{/if}
		{if $avg_price_list}
		<div class="inc">
			<div class="inc_top inc_top_st">{$LANG.AVG_PRICE}</div>
			<div class="inc_main cf">
				<div class="filter_content">
					<ul>
						{if $url_param['a']>0}
						<li class="all"><a href="{$avg_price_all.url}">«{$avg_price_all.name}{$LANG.AVG_PRICE}</a></li>
						{/if}
						{foreach from=$avg_price_list item="avg"}
						{if $avg.act eq 1 || $url_param['a'] <=0}
						<li><a href="{$avg.url}" title="{$avg.name}" {if $avg.act eq 1}class="act"{/if}>{$avg.name}&nbsp;&nbsp;&nbsp;&nbsp;<span>{$avg.count}</span></a></li>
						{/if}
						{/foreach}
					</ul>	
				</div>
			</div>
		</div>
		{/if}
		{if $tag_group}
		{foreach from=$tag_group item=group}
		{if count($group.tags)>0}
		<div class="inc">
			<div class="inc_top inc_top_st">{$group.name}</div>
			<div class="inc_main cf">
				<div class="filter_content">
					<ul>
						<?php $idx = 1; ?>
						{if $group.all.act neq 1}
						<li class="all"><a href="{$group.all.url}" title="{$group.all..name}">«{$group.all.name}{$group.name}</a></li>
						{/if}
						{foreach from=$group.tags item=tag}
						<li <?php if($idx >6){ echo 'class="hide"';} ?>><a href="{$tag.url}" title="{$tag.name}" {if $tag.act eq 1}class="act"{/if}>{$tag.name}</a></li>
						{/foreach}
						{if count($group.tags) > 8 }
						<li class="last">
							<p class="res_sch_link_more res_more_cor">
		                         <a class="g9 tdl z schAllArea" href="javascript:" rel="schAreaMore">展开全部</a>
		                    </p>
						</li>
						{/if}
					</ul>
				</div>
			</div>
		</div>
		<div class="blank"></div>
		{/if}
		{/foreach}	
		{/if}		
	</div>
	<div class="long f_r">
		{if $supplier_info}	 
		<div class="supplier_info_logo f_l"> <img src="{$supplier_info.preview}" /></div>
		<div class="supplier_info_info f_r"> <b>{$supplier_info.name}</b> <br /> {$supplier_info.content}</div>
		<div class="blank"></div>
		{/if}
		<div class="inc">
		<div class="inc_top">
			<span class="it_t f_l">显示：</span>
			<span class=" filter_store">				
				<a onfocus="this.blur();" href="{$filter_url.has_youhui}" {if $filter_url_param.has_youhui eq 1}class="act"{/if}>有优惠</a>
				<a onfocus="this.blur();" href="{$filter_url.has_daijin}" {if $filter_url_param.has_daijin eq 1}class="act"{/if}>有现金券</a>
				<a onfocus="this.blur();" href="{$filter_url.has_tuan}" {if $filter_url_param.has_tuan eq 1}class="act"{/if}>有团购</a>
				<a onfocus="this.blur();" href="{$filter_url.has_event}" {if $filter_url_param.has_event eq 1}class="act"{/if}>有活动</a>
				<a onfocus="this.blur();" href="{$filter_url.is_verify}" {if $filter_url_param.is_verify eq 1}class="act"{/if}>认证商户</a>
			</span>
		
			<div class="f_r " style="font-weight:normal; padding-right:10px;">
				<span class="f_l " style="height:30px; line-height:30px;">排序：</span>
				<a class="f_l sort_icon {if $sort_field eq 'default'}sort_desc{else}sort_gray{/if}" style="color:#fa4c26;font-weight:bolder;" onclick="set_store_sort('default')" href="javascript:void(0);">默认</a> 
				<a class="f_l sort_icon {if $sort_field eq 'dp_count'}sort_{$sort_type}{else}sort_gray{/if}" onclick="set_store_sort('dp_count')" href="javascript:void(0);">点评数</a> 
				<a class="f_l sort_icon {if $sort_field eq 'avg_point'}sort_{$sort_type}{else}sort_gray{/if}" onclick="set_store_sort('avg_point')" href="javascript:void(0);">好评率</a> 
				<a class="f_l sort_icon {if $sort_field eq 'ref_avg_price'}sort_{$sort_type}{else}sort_gray{/if}" onclick="set_store_sort('ref_avg_price')" href="javascript:void(0);">人均</a> 
				
			</div>
		</div>
		{if $list}
		<div class="inc_main">
			{foreach from=$list key=key item=store}
			<div class="store_item">
				<div class="store_info_logo f_l">
					<a href="{$store.url}" title="{$store.name}"><img src="{function name="get_spec_image" v=$store.preview w=95 h=95 g=1}"  width=160 height=100  {if $store.preview}class="lazy"{/if} alt="{$store.name}" width=96 height=96 /></a>
				</div>
				<div class="store_info_info f_l">
					<div class="store_info_info_l f_l">
					<b class="store_title_row"><a href="{url x="store" r="view" p="id=$store.id"}" title="{$store.name}">{$store.name}</a> {if $store.is_verify eq 1}<font class="verify_store" title="认证商家"></font>{/if}</b> 
					{if $store.cate_list}
					<br />
					菜系：<span class="cate">{foreach from="$store.cate_list" item="cate"}<a href="{$cate.url}">{$cate.name}</a>&nbsp;{/foreach}</span>
					{/if}
					{if $store.address}
					<br />
				 	地址：<span title="{$store.address}">{function name="msubstr" v=$store.address b=0 e=30}</span>
					{/if}
					
					{if $store.avg_price}
					<br />
				 	人均：{$store.avg_price}
					{/if}
					
					{if $store.tags}
					<br />
					标签：{foreach from="$store.tags_list" item="tag"}<a href="{url x="store" r="index" p="tag=$tag.name"}"><span class="tel_blue">{$tag.name}</span></a>&nbsp;{/foreach}
					{/if}
					</div>
					<div class="store_info_info_r color_blue f_r">
						<div class="info_item" style="line-height:20px">
						<span class="m_avg_point_{function name="intval" val="$store.avg_point"}" title="总评：{function name="round" val="$store.avg_point" p="1"}分"></span>
						<span class="avg_point">{function name="round" val="$store.avg_point" p="1"}</span>
						</div>
						<div class="info_item" style="line-height:20px">
							<a href="{url x="store" r="view" p="id=$store.id"}#store_dp" class="viewdp">{$store.dp_count}封点评</a>&nbsp;/&nbsp;<span>好评：</span><span style="color:#f60; font-family:verdana;"><?php echo round($this->_var['store']['good_rate']*100,1); ?>%</span>
						</div>
						<div class="info_item">
						{foreach from=$store.group_point item=group}
						<span>{$group.name}:</span><span style="color:#f60; font-family:verdana;">{$group.avg_point}&nbsp;</span>
						{/foreach}
						</div>
						<span class="grebtn {if $store.one_line_order eq 0}grebtn_dis{/if}" {if $store.one_line_order eq 0}title="对不起，该餐厅不支持第三方预订{if $store.tel}，请拨打餐厅电话{$store.tel}预订{/if}"{/if}>
							{if $store.one_line_order eq 0}
							<i class="gray_line"></i>
							<strong class="grabtn_in">
								<span class="grabtn_bg grabtn_bg_l">立即预订</span>
							</strong>
							<i class="gray_line"></i>
							{else}
							<i class="green_line"></i>
							<strong class="grebtn_in">
								<a href="{url x="store" r="order" p="id=$store.id"}" class="grebtn_bg">立即预订</a>
								
							</strong>
							<i class="green_line"></i>
							{/if}
						</span>
					</div>
					<div class="blank1"></div>
					{if $store.tuan_count gt 0}
					<span class="store_tuan">
						<a href="{url x="tuan" r="deal" p="id=$store.tuan.id"}" title="{$store.tuan.name}" target="_blank">{function name="msubstr" v=$store.tuan.name b=0 e=18}</a>
					</span>
					{/if}
					{if $store.youhui_count gt 0}
					<span class="store_youhui">
						<a href="{url x="store" r="fdetail" p="id=$store.youhui.id"}" title="{$store.youhui.name}" target="_blank">{function name="msubstr" v=$store.youhui.name b=0 e=18}</a>
					</span>
					{/if}
				</div>
				
				<div class="blank1"></div>
			</div>
			{/foreach}
		</div>
		{/if}
		<div class="inc_foot"></div>
		</div>
		{if $list}
		<div class="blank"></div>
		<div class="pages">{$pages}</div>
		{else}
		<div style="padding:20px">{$LANG.NO_STORE_LIST}</div>
		{/if}
	</div>
</div>
<div class="blank"></div>
<div id="FW-STORE-IMPRESSION-BOX">
	<div class="box"></div>
	<div class="corner">
		<span class="corner_1">◆</span>
		<span class="corner_2">◆</span>
	</div>
</div>
{include file="inc/footer.html"}